package org.jeecg.modules.monitoring.j_monitoring.entity;

import java.io.Serializable;
import java.io.UnsupportedEncodingException;
import java.util.Date;
import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Getter;
import org.apache.commons.lang.StringUtils;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.jeecg.common.aspect.annotation.Dict;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * @Description: 网络资源(管理)
 * @Author: xiaoyq
 * @Date:   2023-01-11
 * @Version: V1.0
 */
@Data
@TableName("m_gl_network_resource")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="网络资源(管理)", description="网络资源(管理)")
public class MGlNetworkResource implements Serializable {
    private static final long serialVersionUID = 1L;


	/**id;主键*/
	@TableId(type = IdType.ASSIGN_ID)
	@ApiModelProperty(value = "id;主键")
	private java.lang.String id;
	/**设备名称*/
	@Excel(name = "设备名称", width = 15)
	@ApiModelProperty(value = "设备名称")
	private java.lang.String name;
	/**设备型号*/
	@Excel(name = "设备型号", width = 25)
	@ApiModelProperty(value = "设备型号")
	private java.lang.String model;
	/**设备序列号*/
	@Excel(name = "设备序列号", width = 25)
	@ApiModelProperty(value = "设备序列号")
	private java.lang.String equipmentSerialNumber;
	/**资产编号*/
	@Excel(name = "资产编号", width = 20)
	@ApiModelProperty(value = "资产编号")
	private java.lang.String assetNo;
	/**设备编号*/
	@Excel(name = "设备编号", width = 25)
	@ApiModelProperty(value = "设备编号")
	private java.lang.String equipmentNo;
	/**使用状态*/
	@Excel(name = "使用状态", width = 15)
	@ApiModelProperty(value = "使用状态")
	@Dict(dicCode = "j_syzt")
	private java.lang.String usageStatus;
	/**责任人*/
	@Excel(name = "责任人", width = 15)
	@ApiModelProperty(value = "责任人")
	private java.lang.String personLiable;
	/**责任人Id*/
	@ApiModelProperty(value = "责任人id")
	private java.lang.String personLiableId;
	/**设备类型*/
	@Excel(name = "设备类型", width = 15)
	@ApiModelProperty(value = "设备类型")
	private java.lang.String equipmentClassification;
	/**维保开始时间*/
	@Excel(name = "维保开始时间", width = 15)
	@ApiModelProperty(value = "维保开始时间")
	private java.lang.String installDate;
	/**投产时间*/
	@Excel(name = "投产时间", width = 15)
	@ApiModelProperty(value = "投产时间")
	private java.lang.String productionDate;
	/**维保结束时间*/
	@Excel(name = "维保结束时间", width = 15)
	@ApiModelProperty(value = "维保结束时间")
	private java.lang.String expiryDateOfMaintenance;
	/**供应商*/
	@Excel(name = "供应商", width = 15)
	@ApiModelProperty(value = "供应商")
	private java.lang.String deviceSupplier;
	/**供应商*/
	@ApiModelProperty(value = "供应商id")
	private java.lang.String deviceSupplierId;
	/**品牌(制造商)*/
	@Excel(name = "品牌(制造商)", width = 15)
	@ApiModelProperty(value = "品牌(制造商)")
	private java.lang.String deviceProducer;
	/**品牌(制造商)id*/
	@ApiModelProperty(value = "品牌(制造商)id")
	private java.lang.String deviceProducerId;
	/**合同编号*/
	@Excel(name = "合同编号", width = 15)
	@ApiModelProperty(value = "合同编号")
	private java.lang.String contractNo;
	/**设备用途*/
	@Excel(name = "设备用途", width = 15)
	@ApiModelProperty(value = "设备用途")
	@Dict(dicCode = "j_sbyt")
	private java.lang.String purpose;
	/**接口数量*/
	@Excel(name = "接口数量", width = 15)
	@ApiModelProperty(value = "接口数量")
	private java.lang.Integer numberOfPorts;
	/**管理Ip*/
	@Excel(name = "管理IP", width = 15)
	@ApiModelProperty(value = "管理IP")
	private java.lang.String manageIp;
	/**槽位*/
	@Excel(name = "槽位", width = 15)
	@ApiModelProperty(value = "槽位")
	private java.lang.String slotInformation;
	/**是否监测*/
	@Excel(name = "是否监测", width = 15)
	@ApiModelProperty(value = "是否监测")
	@Dict(dicCode = "j_sfjc")
	private java.lang.String whetherToMonitor;
	/**所属区域*/
	@Excel(name = "所属区域", width = 15)
	@ApiModelProperty(value = "所属区域")
	private java.lang.String region;
	/**regionId*/
	@ApiModelProperty(value = "区域id")
	private java.lang.String regionId;
	/**所属机房*/
	@Excel(name = "所属机房", width = 15)
	@ApiModelProperty(value = "所属机房")
	private java.lang.String machineRoom;
	/**machineRoomId*/
	@ApiModelProperty(value = "机房Id")
	private java.lang.String machineRoomId;
	/**所属机柜*/
	@Excel(name = "所属机柜", width = 15)
	@ApiModelProperty(value = "所属机柜")
	private java.lang.String cabinet;
	/**cabinetId*/
	@ApiModelProperty(value = "机柜id")
	private java.lang.String cabinetId;
	/**高度(U)*/
	@Excel(name = "高度(U)", width = 15)
	@ApiModelProperty(value = "高度(U)")
	private java.math.BigDecimal height;

	/**维保商*/
	@Excel(name = "维保商", width = 15)
	@ApiModelProperty(value = "维保商")
	private java.lang.String deviceExpiry;
	/**维保商id*/
	@ApiModelProperty(value = "维保商")
	private java.lang.String deviceExpiryId;
	/**使用U位后*/
	@Excel(name = "使用U位后", width = 15)
	@ApiModelProperty(value = "使用U位后")
	private java.lang.Integer useUH;
	/**使用U位前*/
	@Excel(name = "使用U位前", width = 15)
	@ApiModelProperty(value = "使用U位前")
	private java.lang.Integer useUQ;
	/**上联网络交换机*/
	@Excel(name = "上联网络交换机", width = 15)
	@ApiModelProperty(value = "上联网络交换机")
	private java.lang.String onlineNetworkSwitch;

	@ApiModelProperty(value = "网络交换机Name")
	@Dict(dictTable = "m_gl_network_resource",dicCode = "id",dicText = "concat_ws('',name,' 型号:',model,' IP:',manage_ip,' 机柜:',cabinet,' U位:',use_u_q,'~',use_u_h)")
	private java.lang.String onlineNetworkSwitchId;

	/**报废年限*/
	@Excel(name = "报废年限", width = 15)
	@ApiModelProperty(value = "报废年限")
	private java.lang.String scrapLife;
	/**板卡类型*/
	@Excel(name = "板卡类型", width = 15)
	@ApiModelProperty(value = "板卡类型")
	private java.lang.String boardTyp;

	private String monitorStatus;

	@ApiModelProperty(value = "显示名称")
	@Getter
	@TableField( exist = false)
	private String displayName;

	public String getDisplayName(){
		return this.getName() + " 型号:" + this.getModel() + ( this.manageIp!=null? " IP:" + this.getManageIp() +"" : "" )+ " 机柜:" + this.getCabinet()
				+ (this.useUH!=null || this.useUQ!=null ? " U位:"+ this.useUQ + "~"+this.useUH:"");
	}

	/**备注*/
	@Excel(name = "备注", width = 15)
	@ApiModelProperty(value = "备注")
	private java.lang.String remarks;

	/**创建时间*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
	@DateTimeFormat(pattern="yyyy-MM-dd")
	@ApiModelProperty(value = "创建时间")
	private java.util.Date createTime;

	/**更新时间*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
	@DateTimeFormat(pattern="yyyy-MM-dd")
	@ApiModelProperty(value = "更新时间")
	private java.util.Date updateTime;

	/**创建人*/
	@ApiModelProperty(value = "创建人")
	private java.lang.String createBy;

	/**更新人*/
	@ApiModelProperty(value = "更新人")
	private java.lang.String updateBy;


	@TableField(exist = false)
	private Boolean isMonitor = false;

	@ApiModelProperty(value = "响应时间")
	@TableField(exist = false)
	private String responseTime;

}
